PageInfo.register({
	"type": "Obj",
	"info": function() {

		var PageObj = {};

		PageObj.require = {
			"$": "jquery",
			"layui": "layui",
			"api": "/assets/js/components/common/data-api",
            "util": "/assets/js/components/common/common-util"
		};

		PageObj.page = function() {

			var FunUtil = {};
			var HtmUtil = {};
			var Page = {};

			Page.show = function() {

                var request = this.api;
				var util    = this.util;
				$("div.admin-company-head").hide();

				var Help = {

				    data:{

                    },
                    fun4start:function(){

                        util.layout(function(cparam){
                            cparam.form.on('submit(login-index-btn)', function (data) {
                                console.log(data);
                                request.login.login(data.field, function (cdata,xhr) {
                                	
                                	if(cdata.code == "200"){
                                		 localStorage.setItem("auth",xhr.getResponseHeader("access_token"));
                                         PageInfo.FunUtil.common4openUrl({"url":"admin/index"})
                                	}else{
                                		cparam.layer.msg(cdata.message);
                                	}

                                   

                                })
                                return false;
                            });
                        })



                    }



                }
                Help.fun4start();






  	       };

			return Page;

		};

		return PageObj;
	}
});